package com.xyh.student.dao;

import com.xyh.student.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface StudentDao {

    //查询学生的所有信息
//    List<Map<String,Object>>
    List<Student> queryAllStudents(@Param("start")int start, @Param("pageSize") int pageSize );

    //通过sid查询学生信息
    List<Student> queryBySid(long sid);
    List<Student> queryByName(String name);

    //新增学生
    int insertStudent(Student student);

    //通过课程名查找cid
  int queryCidByName(String name);

    //更新学生信息
    int updateStudent(Student student);

    //删除学生
    int deleteStudentBySid(long sid);

    //批量删除
    int deletes(long[] sids);

    //统计学生数量
    int numberOfStudents();

}
